uni

您所在的位置:网站首页 uniapp fail to open ide uni

uni

2024-01-06 09:33| 来源: 网络整理| 查看: 265

微信小程序错误信息之canvasToTempFilePath: fail canvas is empty

wowkaka: [code=javascript] setTimeout(() => { _this.ctx.draw(false, setTimeout(() => { console.log("_this.canvasStyle", _this.canvasStyle) uni.canvasToTempFilePath({ canvasId: 'mycanvas', quality: 1, // x: 0, // y: 0, // destWidth: 2479, // destHeight: 3508, success: (res)=> { // 在H5平台下,tempFilePath 为 base64 resolve(res.tempFilePath) console.log('生成的路径') uni.uploadFile({ url: _this.$url.upload, filePath: res.tempFilePath, name: 'file', header: { token: _this.$store.state.token, version: '10.00.0' }, success: (res)=>{ console.log("resshangchuanchenggong", JSON.parse(res.data).url) console.log("_this.useHeight", _this.useHeight) _this.$emit('detailUrl', {url:JSON.parse(res.data).url, goodsLength: _this.goodsList.length}) }, fail: (res)=> { [/code]



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3